using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._RasterAnalysisTools._ManageData
{
    /// <summary>
    /// <para>Convert Feature To Raster</para>
    /// <para>Converts features to a raster dataset.</para>
    /// <para>将要素转换为栅格数据集。</para>
    /// </summary>    
    [DisplayName("Convert Feature To Raster")]
    public class ConvertFeatureToRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConvertFeatureToRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputFeatures">
        /// <para>Input Features</para>
        /// <para>The input feature layer.</para>
        /// <para>输入要素图层。</para>
        /// </param>
        /// <param name="_valueField">
        /// <para>Value field</para>
        /// <para>Choose the field that will be used to assign values to the output raster.</para>
        /// <para>选择将用于为输出栅格分配值的字段。</para>
        /// </param>
        /// <param name="_outputName">
        /// <para>Output Name</para>
        /// <para><xdoc>
        ///   <para>The name of the output raster service.</para>
        ///   <para>The default name is based on the tool name and the input layer name. If the layer name already exists, you will be prompted to provide another name.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格服务的名称。</para>
        ///   <para>默认名称基于工具名称和输入图层名称。如果图层名称已存在，系统将提示您提供其他名称。</para>
        /// </xdoc></para>
        /// </param>
        public ConvertFeatureToRaster(object _inputFeatures, object _valueField, object _outputName)
        {
            this._inputFeatures = _inputFeatures;
            this._valueField = _valueField;
            this._outputName = _outputName;
        }
        public override string ToolboxName => "Raster Analysis Tools";

        public override string ToolName => "Convert Feature To Raster";

        public override string CallName => "ra.ConvertFeatureToRaster";

        public override List<string> AcceptEnvironments => ["cellSize", "extent", "outputCoordinateSystem", "snapRaster"];

        public override object[] ParameterInfo => [_inputFeatures, _valueField, _outputName, _outputCellSize, _outputRaster];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature layer.</para>
        /// <para>输入要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputFeatures { get; set; }


        /// <summary>
        /// <para>Value field</para>
        /// <para>Choose the field that will be used to assign values to the output raster.</para>
        /// <para>选择将用于为输出栅格分配值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _valueField { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para><xdoc>
        ///   <para>The name of the output raster service.</para>
        ///   <para>The default name is based on the tool name and the input layer name. If the layer name already exists, you will be prompted to provide another name.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格服务的名称。</para>
        ///   <para>默认名称基于工具名称和输入图层名称。如果图层名称已存在，系统将提示您提供其他名称。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputName { get; set; }


        /// <summary>
        /// <para>Output Cell Size</para>
        /// <para><xdoc>
        ///   <para>Enter the cell size and unit for the output raster.</para>
        ///   <para>The units can be Kilometers, Meters, Miles, or Feet.</para>
        ///   <para>The default units are Meters.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入输出栅格的像元大小和单位。</para>
        ///   <para>单位可以是公里、米、英里或英尺。</para>
        ///   <para>默认单位为米。</para>
        /// </xdoc></para>
        /// <para>单位： Meters | Kilometers | Feet | Miles </para>
        /// </summary>
        [DisplayName("Output Cell Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _outputCellSize { get; set; } = null;


        /// <summary>
        /// <para>Output Raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputRaster { get; set; }


        public ConvertFeatureToRaster SetEnv(object cellSize = null, object extent = null, object outputCoordinateSystem = null, object snapRaster = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, outputCoordinateSystem: outputCoordinateSystem, snapRaster: snapRaster);
            return this;
        }

    }

}